<%@page import="java.sql.*"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%
    try
    {
    Class.forName("com.mysql.jdbc.Driver");
    Connection conexion = DriverManager.getConnection (
    					"jdbc:mysql://localhost/holamundo",
   						"root", 
    					"root");
    Statement s = conexion.createStatement();
    ResultSet rs = s.executeQuery ("select * from tareas");
    
    %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<table border="1">
<tr>
<td>NOMBRE</td>
<td>DESCRIPCION</td>
<td></td>
</tr>

<%
while (rs.next())
{
	%>
	<tr>
	<td><%=rs.getString("nombre") %></td>
	<td><%=rs.getString("descripcion") %></td>
	<td><a href='./detalleTarea.jsp?nombre=<%=rs.getString("nombre")%>'>DETALLAR</a></td>
	</tr>
<%
}
%>
</table>

<% 

conexion.close();
    } catch (Exception e)
{
   e.printStackTrace();
} 

%>


</body>
</html>